package com;

import java.util.ArrayList;
import java.util.Arrays;

public class GenericityMethed1 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        list.add("语文");
        list.add("数学");
        list.add("英语");
        Object[] objects = list.toArray();
        System.out.println(Arrays.toString(objects));
        String[] strings = list.toArray(new String[list.size()]);
        System.out.println(Arrays.toString(strings));

    }
}
